package tk.mybatis.simple.mapper;

import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.CacheNamespaceRef;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.cache.decorators.FifoCache;
import tk.mybatis.simple.model.SysRole;

@CacheNamespaceRef(RoleMapper.class)
public interface RoleMapper {
    @Select({"select id,role_name roleName, enabled, create_by createBy, create_time createTime ", "from sys_role ", "where id = #{id}"})
    SysRole selectById(Long id);

    @Update({"update sys_role","set role_name = #{roleName},","enabled = #{enabled},","create_by = #{createBy},","create_time = #{createTime, jdbcType=TIMESTAMP}","where id = #{id}"})
    int updateById(SysRole sysRole);
}
